FROM alpine
RUN apk update &&\
    apk --no-cache add tzdata && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" >  /etc/timezone
ENV TZ=Asia/Shanghai
RUN apk add --update ca-certificates && \
    rm -rf /var/cache/apk/* /tmp/* && \
    update-ca-certificates

ADD {{.server}}-{{.mod}} /{{.server}}-{{.mod}}
ADD etc/{{.mod}} /etc

ENTRYPOINT [ "/{{.server}}-{{.mod}}", "-f", "/etc/{{.server}}.yaml" ]
